//
// Created by xuwj on 2021/10/29.
//

#ifndef TRACK_ASSISTANT_TF_PUBLISHER_H
#define TRACK_ASSISTANT_TF_PUBLISHER_H

#include "opencv2/core/core.hpp"
#include "tf/transform_broadcaster.h"

using namespace std;

namespace VNavAssistant {
    class TFPublisher {
    public:
        TFPublisher(){}

        TFPublisher(string frame_id_, string child_frame_id_);

        //Tpc : Parent,Child
        void publishTF(cv::Mat &Tpc, const string &frame, const string &child_frame, bool show_quaternion = false);

        void publishTF(tf::Transform& tf_trans_, const string &frame, const string &child_frame);

        //use default frames' ids
        void publishTF(cv::Mat &Tpc, bool show_quaternion = false);

    private:
        //default frame id
        string frame_id, child_frame_id;
        tf::TransformBroadcaster br;
    };

}
#endif //TRACK_ASSISTANT_TF_PUBLISHER_H
